//
//  VoidTableViewCell.m
//  Hero
//
//  Created by lanou3g on 16/5/6.
//  Copyright © 2016年 刘永庆. All rights reserved.
//

#import "VoidTableViewCell.h"
#import "VoidModel.h"
@interface VoidTableViewCell ()
@property (weak, nonatomic) IBOutlet UIImageView *icon;
@property (weak, nonatomic) IBOutlet UILabel *titleLable;
@property (weak, nonatomic) IBOutlet UILabel *contentLable;
@property (weak, nonatomic) IBOutlet UILabel *timeLable;

@end
@implementation VoidTableViewCell

- (void)setDataWithModel:(VoidModel*)moddel
{
    [self.icon sd_setImageWithURL:[NSURL URLWithString:moddel.photo]];
    long long int date1 = (long long int)[moddel.time intValue];
    NSDate *date2 = [NSDate dateWithTimeIntervalSince1970:date1];
    NSDateFormatter* df2 = [[NSDateFormatter alloc]init];
    [df2 setDateFormat:@"yyyy-MM-dd HH:mm:ss"];
    NSString* str1 = [df2 stringFromDate:date2];
    self.timeLable.text = str1;
    self.contentLable.text = moddel.content;
    self.titleLable.text = moddel.title;
}

@end
